#include<vector>
#include<unordered_map>
using namespace std;


class Solution {
public:
    vector<int> singleNumber(vector<int>& nums)
    {
        unordered_map<int, int> hash;
        for (int num : nums)
        {
            hash[num]++;
        }
        vector<int> ans;
        for (const auto& [num, occ] : hash)
        {
            if (occ == 1)
                ans.push_back(num);
        }

        return ans;

    }
};